<?php
$CentreName = $_REQUEST['CentreName'];
$Address = $_REQUEST['Address'];
$PostalCode = $_REQUEST['PostalCode'];
$centreId = $_REQUEST['CentreId'];

include 'conn.php';

$sql = "UPDATE centre SET CentreName='$CentreName',Address='$Address',PostalCode='$PostalCode' WHERE CentreId='$centreId'";
$result = @mysql_query($sql);

if ($result){
	echo json_encode(array('success'=>true));
} else {
	echo json_encode(array('msg'=>"Update Centre NOT Successful!"));
	print '<script type="text/javascript">';
	print 'alert("Update Centre NOT Successful!")';
	print '</script>';
}
?>